package org.szy.core.common.config;

import org.noear.redisx.RedisClient;
import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Condition;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.annotation.Inject;

/**
 * redis 配置类
 *
 * @author 孙志阳
 * @date 2023-06-13
 * @since 1.0.0
 **/
@Configuration
public class RedisConfig {

    @Bean
    @Condition(onProperty = "${redis.enable} = true")
    public RedisClient redisClient(@Inject("${redis}") RedisClient client) {
        return client;
    }

}